#include <stdio.h>
void  method(int m,int n,int *a)
{
	int temp,j=1;
	for(int i=m-1;i<(m+n-1)/2;i++) 
	{
		temp=a[i];
		a[i]=a[m+n-j];
		a[n+m-j]=temp;
		j++;
	}
}
int main()
{
    int a[10];
    int i, m, n;
    
    for ( i=0; i<10; i++ )
        scanf("%d", &a[i] );
    scanf( "%d%d", &m, &n );
    
    method(m,n,a);
    
    for( i=0;i<10;i++ )
        printf( "%d ", a[i] );
        return 0;
}
